package com.a3dweijing.wetouch2.Util;

import android.app.ProgressDialog;
import android.content.Context;

/**
 * Created by Administrator on 2018/3/22.
 * 进度框
 */

public class ProgressDialogHelp {
    public static ProgressDialog create(Context context, String title, String meg, boolean isCanceled) {
        ProgressDialog dialog = new ProgressDialog(context);
        dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);// 设置进度条的形式为圆形转动的进度条
        dialog.setCanceledOnTouchOutside(isCanceled);// 设置在点击Dialog外是否取消Dialog进度条
        dialog.setTitle(title);
        dialog.setMessage(meg);
        return dialog;
    }
    public static ProgressDialog createDefault(Context context) {
       return ProgressDialogHelp.create(context, "提示", "提交中", false);
    }
}
